docs: Clean up the first paragraph for various symbols
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 18 Feb 2021 18:17:56 +0000 (18:17 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Thu, 11 Mar 2021 16:37:30 +0000 (16:37 +0000)
The documentation engine will use the first paragraph as the summary for
a type or constant.

27 files changed:
gtk/gtkaccelgroup.c
gtk/gtkaccessible.c
gtk/gtkbuilder.c
gtk/gtkbuilderscope.h
gtk/gtkbutton.c
gtk/gtkcombobox.c
gtk/gtkconstraint.c
gtk/gtkdragsource.c
gtk/gtkentrycompletion.h
gtk/gtkeventcontroller.c
gtk/gtkheaderbar.c
gtk/gtkicontheme.c
gtk/gtkimage.h
gtk/gtklockbutton.c
gtk/gtkmountoperation.c
gtk/gtkpicture.c
gtk/gtktextbuffer.c
gtk/gtktextiter.c
gtk/gtktextmark.c
gtk/gtktexttag.c
gtk/gtktexttagtable.c
gtk/gtktextview.c
gtk/gtktooltip.c
gtk/gtktreeselection.h
gtk/gtktreesortable.h
gtk/gtktreeviewcolumn.h
gtk/gtkwidget.h

index 376b4ae7d0cb8b5c3a52fd72461d3c7f169bcec6..ff3328906558214849a6a4b1241b0921611bb1d2 100644 (file)
  * @modifiers: modifier mask
  *
  * Determines whether a given keyval and modifier mask constitute
- * a valid keyboard accelerator. For example, the #GDK_KEY_a keyval
- * plus #GDK_CONTROL_MASK is valid - this is a “Ctrl+a” accelerator.
- * But, you can't, for instance, use the #GDK_KEY_Control_L keyval
- * as an accelerator.
+ * a valid keyboard accelerator.
+ *
+ * For example, the %GDK_KEY_a keyval plus %GDK_CONTROL_MASK mark is valid,
+ * and matches the “Ctrl+a” accelerator. But, you can't, for instance, use
+ * the %GDK_KEY_Control_L keyval as an accelerator.
  *
  * Returns: %TRUE if the accelerator is valid
  */
@@ -558,13 +559,15 @@ gtk_accelerator_name_with_keycode (GdkDisplay      *display,
  * @accelerator_mods: accelerator modifier mask
  *
  * Converts an accelerator keyval and modifier mask into a string
- * parseable by gtk_accelerator_parse(). For example, if you pass in
- * #GDK_KEY_q and #GDK_CONTROL_MASK, this function returns “<Control>q”.
+ * parseable by gtk_accelerator_parse().
+ *
+ * For example, if you pass in %GDK_KEY_q and %GDK_CONTROL_MASK,
+ * this function returns `<Control>q`.
  *
  * If you need to display accelerators in the user interface,
  * see gtk_accelerator_get_label().
  *
- * Returns: a newly-allocated accelerator name
+ * Returns: (transfer full): a newly-allocated accelerator name
  */
 char *
 gtk_accelerator_name (guint           accelerator_key,
index c5934c80f8c727ac2a23920ba03d1ca2fdc2cb58..475ac1114ea1f856a269241b0b35ca876507b3a5 100644 (file)
@@ -25,7 +25,9 @@
  *
  * GtkAccessible provides an interface for describing a UI element, like a
  * #GtkWidget, in a way that can be consumed by Assistive Technologies, or
- * “AT”. Every accessible implementation has:
+ * “AT”.
+ *
+ * Every accessible implementation has:
  *
  *  - a “role”, represented by a value of the #GtkAccessibleRole enumeration
  *  - an “attribute”, represented by a set of #GtkAccessibleState,
index 29dbe8ef9d928df4d5d4874372e243f560d718cd..4a65fb3b137f6c894aa77654b5f8645822e87a95 100644 (file)
@@ -24,8 +24,9 @@
  * @Title: GtkBuilder
  *
  * A GtkBuilder is an auxiliary object that reads textual descriptions
- * of a user interface and instantiates the described objects. To create
- * a GtkBuilder from a user interface description, call
+ * of a user interface and instantiates the described objects.
+ *
+ * To create a GtkBuilder from a user interface description, call
  * gtk_builder_new_from_file(), gtk_builder_new_from_resource() or
  * gtk_builder_new_from_string().
  *
index 7d0ae96320e8192f05e5eb0159f85ab9cd6a19ee..4ca48e26115fa05abdb56c75edcd21df0e50926f 100644 (file)
@@ -39,10 +39,11 @@ G_DECLARE_INTERFACE (GtkBuilderScope, gtk_builder_scope, GTK, BUILDER_SCOPE, GOb
  *   g_cclosure_new_swap() for details.
  *
  * The list of flags that can be passed to gtk_builder_create_closure().
+ *
  * New values may be added in the future for new features, so external
- * implementations of GtkBuilderScopeInterface should test the flags for unknown
- * values and raise a %GTK_BUILDER_ERROR_INVALID_ATTRIBUTE error when they
- * encounter one.
+ * implementations of [interface@Gtk.BuilderScope] should test the flags
+ * for unknown values and raise a %GTK_BUILDER_ERROR_INVALID_ATTRIBUTE error
+ * when they encounter one.
  */
 typedef enum { /*< prefix=GTK_BUILDER_CLOSURE >*/
   GTK_BUILDER_CLOSURE_SWAPPED = (1 << 0)
index 7424895a17e15961a42fbaf07c52c64d124f5482..8fbc1b45cdb9d9c82ba15b9d90958642d8306250 100644 (file)
@@ -28,8 +28,7 @@
  * @Title: GtkButton
  *
  * The #GtkButton widget is generally used to trigger a callback function that is
- * called when the button is pressed.  The various signals and how to use them
- * are outlined below.
+ * called when the button is pressed.
  *
  * The #GtkButton widget can hold any valid child widget.  That is, it can hold
  * almost any other standard #GtkWidget.  The most commonly used child is the
index 0b2801e6335a371bfd346b5528a81d1668905dce..61a08cdbd216152b1b966c12271939b0c43686b0 100644 (file)
  * @Title: GtkComboBox
  * @See_also: #GtkComboBoxText, #GtkTreeModel, #GtkCellRenderer
  *
- * A GtkComboBox is a widget that allows the user to choose from a list of
- * valid choices. The GtkComboBox displays the selected choice. When
- * activated, the GtkComboBox displays a popup which allows the user to
- * make a new choice. The style in which the selected value is displayed,
- * and the style of the popup is determined by the current theme. It may
- * be similar to a Windows-style combo box.
+ * A `GtkComboBox` is a widget that allows the user to choose from a list of
+ * valid choices. The `GtkComboBox` displays the selected choice; when
+ * activated, the `GtkComboBox` displays a popup which allows the user to
+ * make a new choice.
  *
  * The GtkComboBox uses the model-view pattern; the list of valid choices
  * is specified in the form of a tree model, and the display of the choices
@@ -73,7 +71,7 @@
  * simple alternative. Both GtkComboBox and #GtkComboBoxText can contain
  * an entry.
  *
- * # CSS nodes
+ * ## CSS nodes
  *
  * |[<!-- language="plain" -->
  * combobox
index d3806b9737598cdb948b4f802fc84afec335f230..90008d3dfe0944794500ed5c66a23b7dd25d4d40 100644 (file)
@@ -23,8 +23,9 @@
  * @Short_description: The description of a constraint
  *
  * `GtkConstraint` describes a constraint between an attribute on a widget
- * and another attribute on another widget, expressed as a linear equation
- * like:
+ * and another attribute on another widget, expressed as a linear equation.
+ *
+ * For instance:
  *
  * ```
  *   target.attr1 = source.attr2 × multiplier + constant
index 47f0ba179d430dee674ec31bfa7fe47b7a0bf524..b6673c0564f6c5e83b0c4b6fd615fb90a1bb5203 100644 (file)
  * @Short_description: Event controller to initiate DND operations
  * @Title: GtkDragSource
  *
- * GtkDragSource is an auxiliary object that is used to initiate
- * Drag-And-Drop operations. It can be set up with the necessary
+ * GtkDragSource is an event controller that is used to initiate
+ * Drag-And-Drop operations.
+ *
+ * GtkDragSource can be set up with the necessary
  * ingredients for a DND operation ahead of time. This includes
  * the source for the data that is being transferred, in the form
  * of a #GdkContentProvider, the desired action, and the icon to
index 476aa9834df4f9d0b684916b1f1afcf05a3ff990..540afc0d1cd979d71023e277c9a691726c66365f 100644 (file)
@@ -46,6 +46,7 @@ typedef struct _GtkEntryCompletion            GtkEntryCompletion;
  *
  * A function which decides whether the row indicated by @iter matches
  * a given @key, and should be displayed as a possible completion for @key.
+ *
  * Note that @key is normalized and case-folded (see g_utf8_normalize()
  * and g_utf8_casefold()). If this is not appropriate, match functions
  * have access to the unmodified key via
index f58865d7cdcc07c4cf996531b071198c73b4ed2f..7d1c9ea1d7fff3d45affac1634f0a44b71ff0112 100644 (file)
@@ -25,8 +25,9 @@
  * @See_also: #GtkGesture
  *
  * #GtkEventController is a base, low-level implementation for event
- * controllers. Those react to a series of #GdkEvents, and possibly trigger
- * actions as a consequence of those.
+ * controllers: ancillary object associated to widgets, which react
+ * to a series of #GdkEvents, and possibly trigger actions as a
+ * consequence.
  */
 
 #include "config.h"
index 786dfb754e7211ffaa40de4b0f805df2304ba96d..821e29f99feeba30b5653a510c5ddd46ccaa2cf3 100644 (file)
@@ -43,6 +43,9 @@
  * @Title: GtkHeaderBar
  * @See_also: #GtkBox, #GtkActionBar
  *
+ * `GtkHeaderBar` is a widget for creating custom title bars for
+ * [class@Gtk.Window].
+ *
  * GtkHeaderBar is similar to a horizontal #GtkBox. It allows children to 
  * be placed at the start or the end. In addition, it allows the window
  * title to be displayed. The title will be centered with respect to the
index a5bfdaf5a03832d6f5bdd59915ae56f364e06461..e1e233d768d904de55562b37cdfca112d9d63e2b 100644 (file)
  * @Title: GtkIconTheme
  *
  * #GtkIconTheme provides a facility for looking up icons by name
- * and size. The main reason for using a name rather than simply
- * providing a filename is to allow different icons to be used
- * depending on what “icon theme” is selected
- * by the user. The operation of icon themes on Linux and Unix
+ * and size.
+ *
+ * The main reason for using a name rather than simply providing a filename
+ * is to allow different icons to be used depending on what “icon theme” is
+ * selected by the user. The operation of icon themes on Linux and Unix
  * follows the [Icon Theme Specification](http://www.freedesktop.org/Standards/icon-theme-spec)
  * There is a fallback icon theme, named `hicolor`, where applications
  * should install their icons, but additional icon themes can be installed
index 6700b3d525e77804b9c16181f73b34199ccd9a3c..c63b37a1c1974af5bda40a10daff83020d3d8a23 100644 (file)
@@ -49,13 +49,14 @@ typedef struct _GtkImage              GtkImage;
  * @GTK_IMAGE_GICON: the widget contains a #GIcon
  * @GTK_IMAGE_PAINTABLE: the widget contains a #GdkPaintable
  *
- * Describes the image data representation used by a #GtkImage. If you
- * want to get the image from the widget, you can only get the
- * currently-stored representation. e.g.  if the
- * gtk_image_get_storage_type() returns #GTK_IMAGE_PAINTABLE, then you can
- * call gtk_image_get_paintable().  For empty images, you can request any
- * storage type (call any of the "get" functions), but they will all
- * return %NULL values.
+ * Describes the image data representation used by a [class@Gtk.Image].
+ *
+ * If you want to get the image from the widget, you can only get the
+ * currently-stored representation; for instance, if the gtk_image_get_storage_type()
+ * returns %GTK_IMAGE_PAINTABLE, then you can call gtk_image_get_paintable().
+ *
+ * For empty images, you can request any storage type (call any of the "get"
+ * functions), but they will all return %NULL values.
  */
 typedef enum
 {
index b9754b2e173ecb582249dc4a941110edcbf9135b..afed0d93f03d9330b1baf3ea759d9328a8a904f8 100644 (file)
  *
  * GtkLockButton is a widget that can be used in control panels or
  * preference dialogs to allow users to obtain and revoke authorizations
- * needed to operate the controls. The required authorization is represented
- * by a #GPermission object. Concrete implementations of #GPermission may use
- * PolicyKit or some other authorization framework. To obtain a PolicyKit-based
- * #GPermission, use polkit_permission_new().
+ * needed to operate the controls.
+ *
+ * The required authorization is represented by a #GPermission object.
+ * Concrete implementations of #GPermission may use PolicyKit or some
+ * other authorization framework. To obtain a PolicyKit-based
+ * #GPermission, use `polkit_permission_new()`.
  *
  * If the user is not currently allowed to perform the action, but can obtain
  * the permission, the widget looks like this:
index f5380863bd9d8a05511c12a348fad4633fbb3f17..c7b36081f0fb99cd6675d19399ed59a9b03488bc 100644 (file)
 #include <glib/gprintf.h>
 
 /**
- * SECTION:filesystem
+ * SECTION:gtkmountoperation
  * @short_description: Functions for working with GIO
  * @Title: Filesystem utilities
  *
+ * `GtkMountOperation` is an implementation of `GMountOperation` that
+ * can use a graphical user interface when requiring information from
+ * the user, like passwords or other information.
+ *
  * The functions and objects described here make working with GTK and
  * GIO more convenient.
  *
index 0668cad14b250c0aa59f93b45898762aa0009490..2317b93e5522f336d9be157a511f2392ec0ffb30 100644 (file)
  * @Title: GtkPicture
  * @SeeAlso: #GdkPaintable, #GtkImage
  *
- * The #GtkPicture widget displays a #GdkPaintable. Many convenience functions
- * are provided to make pictures simple to use. For example, if you want to load
- * an image from a file, and then display that, there’s a convenience function
- * to do this:
- * |[<!-- language="C" -->
- *   GtkWidget *widget;
- *   widget = gtk_picture_new_for_filename ("myfile.png");
- * ]|
+ * The `GtkPicture` widget displays a `GdkPaintable`.
+ *
+ * Many convenience functions are provided to make pictures simple to use.
+ * For example, if you want to load an image from a file, and then display
+ * it, there’s a convenience function to do this:
+ *
+ * ```c
+ *   GtkWidget *widget = gtk_picture_new_for_filename ("myfile.png");
+ * ```
+ *
  * If the file isn’t loaded successfully, the picture will contain a
  * “broken image” icon similar to that used in many web browsers.
  * If you want to handle errors in loading the file yourself,
@@ -59,7 +61,7 @@
  * GtkPicture displays an image at its natural size. See #GtkImage if you want
  * to display a fixed-size image, such as an icon.
  *
- * # Sizing the paintable
+ * ## Sizing the paintable
  *
  * You can influence how the paintable is displayed inside the #GtkPicture.
  * By turning off #GtkPicture:keep-aspect-ratio you can allow the paintable
  * sure the paintable doesn't fill all available space but is instead displayed
  * at its original size.
  *
- * # CSS nodes
+ * ## CSS nodes
  *
- * GtkPicture has a single CSS node with the name picture.
+ * `GtkPicture` has a single CSS node with the name `picture`.
  *
- * # Accessibility
+ * ## Accessibility
  *
- * GtkPicture uses the #GTK_ACCESSIBLE_ROLE_IMG role.
+ * `GtkPicture` uses the `GTK_ACCESSIBLE_ROLE_IMG` role.
  */
 
 enum
index 3302d07261551b23949e708f6a46dcc82d4306ff..a1924d0e478395df347375287faec1c2343fd8b3 100644 (file)
  * @Title: GtkTextBuffer
  * @See_also: #GtkTextView, #GtkTextIter, #GtkTextMark
  *
- * You may wish to begin by reading the
- * [text widget conceptual overview][TextWidget]
- * which gives an overview of all the objects and data
- * types related to the text widget and how they work together.
+ * Stores text (with or without attributes) for display in a
+ * [class@Gtk.TextView] widget.
+ *
+ * You may wish to begin by reading the [text widget conceptual overview][TextWidget]
+ * which gives an overview of all the objects and data types related to the
+ * text widget and how they work together.
  */
 
 typedef struct _GtkTextLogAttrCache GtkTextLogAttrCache;
index 232634f18dad1228ddf56f5876551e12c44df8e6..82d3e88b45de8bf00a877695bb3ff2826ab8637b 100644 (file)
@@ -38,6 +38,8 @@
  * @Short_description: Text buffer iterator
  * @Title: GtkTextIter
  *
+ * An iterator for the contents of a [class@Gtk.TextBuffer]
+ *
  * You may wish to begin by reading the
  * [text widget conceptual overview][TextWidget]
  * which gives an overview of all the objects and data
index ebfa6242bc43e07277a8340df77dfec56890cb35..dfe79b5bd25df7ab4ec242e32a597ca5d7218774 100644 (file)
@@ -58,6 +58,8 @@
  * @Short_description: A position in the buffer preserved across buffer modifications
  * @Title: GtkTextMark
  *
+ * A position in a [class@Gtk.TextBuffer] preserved across modifications.
+ *
  * You may wish to begin by reading the
  * [text widget conceptual overview][TextWidget]
  * which gives an overview of all the objects and data
index 727ed359da096fc8fec2d08eef8be66e8deb40a1..fd10b2d06cd86968e83daebb42dabd65ed30cd54 100644 (file)
@@ -52,6 +52,8 @@
  * @Title: GtkTextTag
  * @Short_description: A tag that can be applied to text in a GtkTextBuffer
  *
+ * A tag that can be applied to text contained in a [class@Gtk.TextBuffer].
+ *
  * You may wish to begin by reading the
  * [text widget conceptual overview][TextWidget]
  * which gives an overview of all the objects and
index 1435e7375c701d4d4cdb75397cc69b1d247bc768..db60c037d12c7378ae8accb2560f760891d520a9 100644 (file)
@@ -41,6 +41,8 @@
  * @Short_description: Collection of tags that can be used together
  * @Title: GtkTextTagTable
  *
+ * The collection of tags in a [class@Gtk.TextBuffer].
+ *
  * You may wish to begin by reading the
  * [text widget conceptual overview][TextWidget]
  * which gives an overview of all the objects and
index 5b8bca680af58c075260b008e72386f3312b1ad9..b3abee302cf7a63860eb0fbdc079f1a388dd127d 100644 (file)
  * @Title: GtkTextView
  * @See_also: #GtkTextBuffer, #GtkTextIter
  *
+ * A widget that displays the contents of a [class@Gtk.TextBuffer].
+ *
  * You may wish to begin by reading the
  * [text widget conceptual overview][TextWidget]
  * which gives an overview of all the objects and data
  * types related to the text widget and how they work together.
  *
- * # CSS nodes
+ * ## CSS nodes
  *
  * |[<!-- language="plain" -->
  * textview.view
@@ -91,7 +93,7 @@
  * If a context menu is opened, the window node will appear as a subnode
  * of the main node.
  *
- * # Accessibility
+ * ## Accessibility
  *
  * GtkTextView uses the #GTK_ACCESSIBLE_ROLE_TEXT_BOX role.
  */
index bb33088632ffa9202a2dca850b9819afd259345d..ebbf7b1140f3185f4aca5df225f48493f3366fa4 100644 (file)
@@ -40,6 +40,8 @@
  * @Short_description: Add tips to your widgets
  * @Title: GtkTooltip
  *
+ * An object representing a widget tooltip.
+ *
  * Basic tooltips can be realized simply by using gtk_widget_set_tooltip_text()
  * or gtk_widget_set_tooltip_markup() without any explicit tooltip object.
  *
index 351b1a665ac2a25cf2e82f9476d2eb561ef9895f..40f46fac6dee6b447d5028f3aa3141391d6d95ef 100644 (file)
@@ -40,9 +40,11 @@ G_BEGIN_DECLS
  * @data: (closure): user data
  *
  * A function used by gtk_tree_selection_set_select_function() to filter
- * whether or not a row may be selected.  It is called whenever a row's
- * state might change.  A return value of %TRUE indicates to @selection
- * that it is okay to change the selection.
+ * whether or not a row may be selected. It is called whenever a row's
+ * state might change.
+ *
+ * A return value of %TRUE indicates to @selection that it is okay to
+ * change the selection.
  *
  * Returns: %TRUE, if the selection state of the row can be toggled
  */
index be64f893012c861daeaa29c8190143ce00524ebe..56f3567305ec4705f4b7002dbdfe8d35c7639e23 100644 (file)
@@ -37,20 +37,18 @@ G_BEGIN_DECLS
 /**
  * GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID:
  *
- * The GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID can be used to make a
- * #GtkTreeSortable use the default sort function.
+ * Uses the default sort function in a [interface@Gtk.TreeSortable].
  *
- * See also gtk_tree_sortable_set_sort_column_id()
+ * See also: [method@Gtk.TreeSortable.set_sort_column_id]
  */
 #define GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID (-1)
 
 /**
  * GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID:
  *
- * The GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID can be used to make a
- * #GtkTreeSortable use no sorting.
+ * Disables sorting in a [interface@Gtk.TreeSortable].
  *
- * See also gtk_tree_sortable_set_sort_column_id()
+ * See also: [method@Gtk.TreeSortable.set_sort_column_id]
  */
 #define GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID (-2)
 
@@ -67,7 +65,9 @@ typedef struct _GtkTreeSortableIface GtkTreeSortableIface;
  *
  * A GtkTreeIterCompareFunc should return a negative integer, zero, or a positive
  * integer if @a sorts before @b, @a sorts with @b, or @a sorts after @b
- * respectively. If two iters compare as equal, their order in the sorted model
+ * respectively.
+ *
+ * If two iters compare as equal, their order in the sorted model
  * is undefined. In order to ensure that the #GtkTreeSortable behaves as
  * expected, the GtkTreeIterCompareFunc must define a partial order on
  * the model, i.e. it must be reflexive, antisymmetric and transitive.
index 7199636f24f6a37319134c5a493e2789c09bf74b..cac13b4cdc6c276f477b2190b55e6a53963bfc6d 100644 (file)
@@ -63,11 +63,13 @@ typedef enum
  * @data: (closure): user data
  *
  * A function to set the properties of a cell instead of just using the
- * straight mapping between the cell and the model.  This is useful for
- * customizing the cell renderer.  For example, a function might get an
- * integer from the @tree_model, and render it to the “text” attribute of
- * “cell” by converting it to its written equivalent.  This is set by
- * calling gtk_tree_view_column_set_cell_data_func()
+ * straight mapping between the cell and the model.
+ *
+ * This function is useful for customizing the cell renderer. For example,
+ * a function might get an* integer from the @tree_model, and render it to
+ * the “text” attribute of “cell” by converting it to its written equivalent.
+ *
+ * See also: gtk_tree_view_column_set_cell_data_func()
  */
 typedef void (* GtkTreeCellDataFunc) (GtkTreeViewColumn *tree_column,
                                      GtkCellRenderer   *cell,
index 765cb207c369ce9276321d4d5c0032b8d0b3ceb6..53f218b133bb213fac0b855118d9975fb8ba9015 100644 (file)
@@ -62,11 +62,7 @@ typedef struct _GtkWidgetClassPrivate  GtkWidgetClassPrivate;
  * @width: the width of the widget’s allocated area.
  * @height: the height of the widget’s allocated area.
  *
- * A #GtkAllocation-struct of a widget represents region
- * which has been allocated to the widget by its parent. It is a subregion
- * of its parents allocation. See
- * [GtkWidget’s geometry management section][geometry-management] for
- * more information.
+ * The rectangle representing the area allocated for a widget by its parent.
  */
 typedef         GdkRectangle       GtkAllocation;